<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
		<meta http-equiv="Cache-Control" content="no-store"/>
		<meta http-equiv="Pragma" content="no-cache"/>
		<meta http-equiv="Expires" content="0"/>
		<title>test</title>
		<link rel="stylesheet" type="text/css" href="itreasury/css/pagestyle.css"  />
		<link rel="stylesheet" type="text/css" href="itreasury/easyui_themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="itreasury/easyui_themes/icon.css">
		<link rel="stylesheet" type="text/css" href="itreasury/css/suggest.css">
		<script type="text/javascript" src="itreasury/js/jquery-1.8.0.min.js"></script>
		<script type="text/javascript" src="itreasury/js/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="itreasury/js/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/JavaScript" src="itreasury/js/json.min.js"></script>
		<script type="text/JavaScript" src="itreasury/js/jquery.bgiframe.min.js"></script>
		<script type="text/JavaScript" src="itreasury/js/jquery.actual.min.js"></script>
		<script type="text/JavaScript" src="itreasury/js/jquery.dropshadow.js"></script>
		<script type="text/JavaScript" src="itreasury/js/form_text_amount.js"></script>
		<script type="text/JavaScript" src="itreasury/js/form_text_rate.js"></script>
		<script type="text/JavaScript" src="itreasury/js/arabia_to_chinese.js"></script>
		<script type="text/JavaScript" src="itreasury/js/form_magnifier.js"></script>
		<script type="text/JavaScript" src="itreasury/js/Math.uuid.js"></script>
		<script type="text/JavaScript" src="itreasury/js/datacheck_formvalidate.js"></script>
		<script type="text/JavaScript" src="itreasury/js/datacheck_comparedate.js"></script>
		<script type="text/JavaScript" src="itreasury/js/utils.js"></script>
	</head>

	<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
		<form name="form1" id="form1" action="" method="post">
			<div class="pageMain">
				<div class="pageTitle">银行与账户权限分配设置</div>
				<div class="pageBody">

  				<table class="tableFrom">
  					<tbody>
        			<tr>
			        	<td class="td01"></td>
			        	<td class="td02">单位名称：</td>
			        	<td class="td04">
			        		<input type="text" id="agencyName" name="agencyName"  value="" size="22" />
			        		<input type="hidden" id="agencyId" name="agencyId"  value="" size="22" />
			        	</td>
			        	<td class="td01"></td>
			        	<td class="td02">职责名称：</td>
			        	<td class="td03">
			        		<input type="text" id="dutyName" name="dutyName"  value="" size="22" />
			        		<input type="hidden" id="dutyId" name="dutyId"  value="" size="22" />
			        	</td>
			        </tr>
			       
			   			<tr>
			       		<td colspan="6">
			       			<iframe  id="testFrame" name="testFrame" src="testFrame.html"  frameBorder="0"  style=" border: none" height="400" width="100%" scrolling="no"></iframe>
			       		</td>
			       	</tr>
			       	<tr>
			       		<td colspan="6" align="right">
			       			<input type="button" class="button" id="butQuery" name="butQuery" value="获取"/>
			       		</td>
			       	</tr>
			   		</tbody>
					</table>
					<br />
					<!--
					<table width="100%">
						<tbody>
							<tr>
								<td>
									<table id="datagrid"></table>
								</td>
							</tr>
						</tbody>
					</table>
					-->		
				</div>
			</div>
		</form>
		<script type="text/javascript">
			$(document).ready(function() {
	
				//加载放大镜控件 sampleText5
				$("#agencyName").magnifier({
					url: '',
					sortName: 'agencyid',
					sortOrder: 'asc',
					formid: 'form1',
					linkName: 'agencyname',
					columns: [[
							{title:'单位编号', field:'agencycode', width:150, sortable:true, align: 'left'},
							{title:'单位名称', field:'agencyname', width:250, sortable:true, align: 'left'},
					        {field:'agencyid', hidden:true, formel:'agencyId'} 
					]],
					onBeforeOpen:function(p){
					      var queryParams = {
					          AGENCYNAME:$("#agencyName").val()
					      };
					      return queryParams;
					    }
					
				});
				
				$("#dutyName").magnifier({
					url: '',
					sortName: 'id',
					sortOrder: 'asc',
					formid: 'form1',
					linkName: 'dutyname',
					columns: [[
							{title:'职责编号', field:'dutycode', width:150, sortable:true, align: 'left'},
							{title:'职责名称', field:'dutyname', width:250, sortable:true, align: 'left'},
					        {field:'id', hidden:true, formel:'dutyId'} 
					]],
					onBeforeOpen:function(p){
					      var queryParams = {
					    		  DUTYNAME:$("#dutyName").val()
					      };
					      return queryParams;
					    }
				});
				
				$('#butQuery').bind('click',function(){
					//alert('开始');
					var iframeDoc = window.frames["testFrame"].contentWindow;
					
					
					alert(JSON.stringify($(iframeDoc).find('#datagrid')));
					alert(JSON.stringify($(iframeDoc).find('#get')));
					var button = $(iframeDoc).find('#get');
					button.attr('disabled',true);
					//var a =$(iframeDoc).find('#datagrid');
					//$(a).datagrid('reload');
					//$('#datagrid',iframeDoc).datagrid('reload');
					//alert('结束');			
				});
				
			});
		</script>
	</body>
</html>